<template>
    <!-- 饼状图 -->
    <div ref="echarts" style="height: 230px"></div>
</template>

<script>
import { getData } from "@/api/sys/user/user";
//引入echarts
import * as echarts from "echarts";
export default {
  mounted() {
    getData().then((res) => {
      const myChart = echarts.init(this.$refs.echarts);
      //console.log(videoData.map(item=>item));
      const pieOption = {
        tooltip: {
          trigger: "item",
        },
        color: [
          "#0f78f4",
          "#dd536b",
          "#9462e5",
          "#a6a6a6",
          "#e1bb22",
          "#39c362",
          "#3ed1cf",
        ],
        series: [
          {
            type: "pie",
            data: [], //填写自己的数据
          },
        ],
      };
      myChart.setOption(pieOption);
    });
  },
};
</script>

<style>
</style>